package mybatisTest.parsexmltest.sax.test2;

import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class Test {
    public static void main(String[] args) throws SAXException, FileNotFoundException {
        XMLReader reader=XMLReaderFactory.createXMLReader();
        reader.setFeature("http://xml.org/sax/features/validation",true);
        reader.setFeature("http://xml.org/sax/features/namespaces",true);
        try {
            reader.parse(new InputSource(new FileReader("D:\\code\\javaweb\\Java\\src\\main\\java\\mybatisTest\\parsexmltest\\sax\\all-book.xml")));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
